package ae.pcfc.etks.online.web.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class JQGridJSONModel implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3948390432891011901L;
	private class JQGridRow implements Serializable {
		private static final long serialVersionUID = -8400520930872080232L;
		private String id;
		private List<String> cell;
		
		public JQGridRow(String id, List<String> cell) {
			super();
			this.setId(id);
			this.setCell(cell);
		}

		public void setId(String id) {
			this.id = id;
		}

		public String getId() {
			return id;
		}

		public void setCell(List<String> cell) {
			this.cell = cell;
		}

		public List<String> getCell() {
			return cell;
		}

	}

	private String total;
	private String page;
	private String  records;
	private List<JQGridRow> rows = new ArrayList<JQGridRow>();
	
	
	/**
	 * @return the total
	 */
	public String getTotal() {
		return total;
	}
	/**
	 * @param total the total to set
	 */
	public void setTotal(String total) {
		this.total = total;
	}
	/**
	 * @return the page
	 */
	public String getPage() {
		return page;
	}
	/**
	 * @param page the page to set
	 */
	public void setPage(String page) {
		this.page = page;
	}
	/**
	 * @return the records
	 */
	public String  getRecords() {
		return records;
	}
	/**
	 * @param records the records to set
	 */
	public void setRecords(String records) {
		this.records = records;
	}
	
	/**
	 * @param rows the rows to set
	 */
	public void addRows(String id,List cells) {
		this.rows.add(new JQGridRow(id,cells));
	}
	/**
	 * @return the rows
	 */
	public List<JQGridRow> getRows() {
		return rows;
	}

}
